package com.xysd.express.activity.mine.setting;

import android.view.View;
import android.widget.CheckedTextView;

import com.xysd.express.R;
import com.xysd.express.base.BaseActivity;
import com.xysd.express.bean.User;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;

@ContentView(R.layout.activity_pay_setting)
public class PaySettingActivity extends BaseActivity implements View.OnClickListener {

    @ViewInject(R.id.onoff_tv)
    CheckedTextView onoff_tv;
    @Override
    protected void init() {
        setTitleBar("支付设置");
        onoff_tv.setChecked(User.getInstance().IsSetPayPwd);
        onoff_tv.setOnClickListener(this);
        try {
            Class clazz=Class.forName("java.util.Date");
            clazz.getDeclaredField("name");
            clazz.getConstructor(new Class[]{String.class});
        } catch (ClassNotFoundException e) {
            e.printStackTrace();
        } catch (NoSuchFieldException e) {
            e.printStackTrace();
        } catch (NoSuchMethodException e) {
            e.printStackTrace();
        }
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.onoff_tv:
                onoff_tv.toggle();
                break;
        }
    }
}
